<?php
namespace app\common\service;
class BaseService
{
    static protected $Instance=array();

    /**
     * @param array $config
     * @return $this
     */
    static public function S($config=[]){
        $class=get_called_class();
        if(!isset(self::$Instance[$class]))
            self::$Instance[$class]=new $class($config);
        return self::$Instance[$class];
    }
}